package com.xingkeduo.pojo.table;

import org.apache.ibatis.type.Alias;

import com.xingkeduo.util.pojo.base.BaseEnum;
import com.xingkeduo.util.pojo.base.BaseTable;

/**
 * 求职者审核评分信息类
 * 
 * @author 高杰
 * @time 2019年2月28日 下午3:34:33
 * @description
 */
@Alias("JobseekerAssessRate")
public class JobseekerAssessRateTO extends BaseTable<JobseekerAssessRateTO> {
	public enum Type implements BaseEnum {
		FIRST(1, "初试评分"),
		TECH(2, "技术评分"),
		ATTAIN(3, "素养评分"),
		DEGIGN(4,"个人设计感"),
		RITUAL(5, "仪式感"),
		MALE(6, "男发熟练程度"),
		PROCESS(7, "流程掌握"),
		FEMALESHORT(8, "女士短发熟练程度"),
		HEALTH(9, "卫生细节"),
		VALUE(10, "企业价值观认同度"),
		FEMALELONG(11, "女士长发熟练程度"),
		EFFICIENCY(12, "效率"),
		INTEGRATED(13, "老师综合评语");

		private int value;
		private String desc;

		private Type(int value, String desc) {
			this.value = value;
			this.desc = desc;
		}

		public static boolean validValue(String value) {
			int value_int = Integer.parseInt(value);
			return validValue(value_int);
		}

		public static boolean validValue(int value) {
			Type[] types = Type.values();
			for (int i = 0; i < types.length; i++) {
				if (types[i].getValue() == value)
					return true;
			}
			return false;
		}

		public static Type getType(String value) {
			int value_int = Integer.parseInt(value);
			return getType(value_int);
		}

		public static Type getType(int value) {
			switch (value) {
			case 1:
				return FIRST;
			case 2:
				return TECH;
			case 3:
				return ATTAIN;
			case 4:
				return DEGIGN;
			case 5:
				return RITUAL;
			case 6:
				return MALE;
			case 7:
				return PROCESS;
			case 8:
				return FEMALESHORT;
			case 9:
				return HEALTH;
			case 10:
				return VALUE;
			case 11:
				return FEMALELONG;
			case 12:
				return EFFICIENCY;
			case 13:
				return INTEGRATED;
			default:
				return null;
			}
		}

		@Override
		public int getValue() {
			return value;
		}

		public String getDesc() {
			return desc;
		}
	}

	private int score;
	private Type type;
	private long jobseekerAssessId;

	public int getScore() {
		return score;
	}

	public JobseekerAssessRateTO setScore(int score) {
		this.score = score;
		return this;
	}

	public Type getType() {
		return type;
	}

	public JobseekerAssessRateTO setType(Type type) {
		this.type = type;
		return this;
	}

	public long getJobseekerAssessId() {
		return jobseekerAssessId;
	}

	public JobseekerAssessRateTO setJobseekerAssessId(long jobseekerAssessId) {
		this.jobseekerAssessId = jobseekerAssessId;
		return this;
	}
}
